package com.rwy.util.constant;

/** fault device constant enum
 * */

public enum FaultDeviceEnum {
   
	task_wait_handle(301, "待处理") , task_processed_task(302, "已处理"), task_help_task(303, "求助"),
    record_wait_handle(401, "待处理"), record_processed_task(402, "已处理"), record_help_task(403, "求助"),
    advice_task_wait_status(501, "待通知"), advice_processed_task(502, "已通知"), advice_fail_task(503, "通知失败");
   
	private int id;
	private String name;
	
    FaultDeviceEnum(int id, String name) {
		this.id = id;
		this.name = name;
	} 
    
    public static String getNameByID(int id) {
    	String name = "";
    	for (FaultDeviceEnum en: FaultDeviceEnum.values()) {
    		if (en.getId() == id) {
    			name = en.getName();
    		}
    	} 
    	return name;
    }
    
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	
}
